package com.by.crud;

import org.springframework.beans.factory.annotation.Autowired;


/**
 * 这里实现了Icurd的全部抽象方法，我们在实现类中直接调用即可
 * @param <T>
 * @param <M>
 */
public class IcurdServiceImpl<T, M extends IcurdMapper <T>> implements IcurdSrevice<T>{

   @Autowired
   protected  M mapper;

    @Override
    public int insert(T t) {
        return mapper.insert(t);
    }

    @Override
    public int update(T t) {
        return mapper.update(t);
    }

    @Override
    public int delete(T t) {
        return mapper.delete(t);
    }

    @Override
    public T select(T t) {
        return mapper.select(t);
    }
}
